package com.seadragon.apps.doctorcard.service;

import java.util.Date;

import com.seadragon.apps.doctorcard.model.Chat;
import com.seadragon.apps.doctorcard.model.ChatMessage;
import com.seadragon.apps.doctorcard.model.Contact;
import com.seadragon.apps.doctorcard.model.DoctorCardResult;
import com.seadragon.apps.doctorcard.model.Message;

public interface ChatMessageService {
	ChatMessage save(ChatMessage chatMessage);
	ChatMessage findById(long id);
	DoctorCardResult forwardMessage(Contact contact, Chat chat, long messageId);
	DoctorCardResult sendMessage(Contact contact, Chat chat, Message message);
	DoctorCardResult findMessagesByChat(Contact contact, long chatId, int offset, int pageSize);
	DoctorCardResult findMessagesByChatAndDate(Contact contact, long chatId, int offset, int pageSize, Date dateLastRetrieved);
}
